import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsEnum, IsOptional } from 'class-validator';

export class PayOrderDto {
  @ApiProperty({
    description: '支付方式',
    enum: ['alipay', 'wechat'],
    example: 'alipay',
  })
  @IsEnum(['alipay', 'wechat'])
  paymentMethod: 'alipay' | 'wechat';

  @ApiPropertyOptional({
    description: '支付类型',
    enum: ['page', 'wap', 'native', 'jsapi'],
    example: 'page',
  })
  @IsOptional()
  @IsEnum(['page', 'wap', 'native', 'jsapi'])
  paymentType?: 'page' | 'wap' | 'native' | 'jsapi';
}

